home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / Script Examples / • Example Example / Makefile < prev    next >
Encoding:
Makefile  |  1994-11-15  |  4.9 KB  |  113 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "Example.r"
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "Example" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "Example.debug"
  12. #            
  13. #
  14. #    mark young - 08/25/94
  15. #
  16. #    NOTE: All the example makefiles use the standard of no quotes around
  17. #    the variable assignments and use of double quotes around each expanded
  18. #    variable within the commands in the makefile. As a general rule this
  19. #    is not necessary, but was requested from some of our user's for
  20. #    compatability with their scripts that run the example makefiles.
  21. #
  22. #    As a general rule, when using paths, filenames or variables within
  23. #    the command lines of a makefile you should only need to use single
  24. #    or double quotes around a value that contains spaces. We have gone
  25. #    overboard in use of quotes to allow for folks changing the paths
  26. #     and filenames, so that if anyone adds a space character somewhere,
  27. #    the modified makefile will still work.
  28. #
  29.  
  30. # • script names
  31.  
  32. # the installer script name
  33. scriptName                = Example
  34. # the debug version installer script name
  35. debugScriptName            = "{scriptName}.debug"
  36.  
  37. # • tool names
  38.  
  39. # You may want to change the paths or names of the InstaCompOne tools that are
  40. # provided with the 4.0.3 SDK. If you do change their names, you should
  41. # update the variable assignments below.
  42.  
  43. # InstaCompOne compression tool
  44. compressTool            = :::InstaCompOne 1.0:InstaCompOneTool
  45.  
  46. # InstaCompOne splitting tool
  47. splitTool                = :::InstaCompOne 1.0:FileAndRsrcSplitterTool
  48.  
  49. # • support directory names
  50.  
  51. # You may change the following paths as you see fit. Currently all paths 
  52. # are set so that scripts will compile when using the original directory
  53. # layout from the Installer 4.0.3 SDK.
  54.  
  55. # You may place the ScriptCheck tool in the 'MPW:Tools:' directory. Doing this
  56. # removes the need for the {ScriptCheckDir} variable within the makefile.
  57. # The same applies for the FileAndRsrcSplitterTool that is not used in this
  58. # example, but is used in the four examples for InstaCompOne compression
  59. # and splitting.
  60. ScriptCheckDir            = :::ScriptCheck 4.0.3:
  61.  
  62. # You may place "InstallerTypes.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  63. # Doing this removes the need for the {InstallerRIncDir} variable or -i specification
  64. # for Rez and compile ( C ) commands within the makefile. The same applies to the rest
  65. # of the Developer Interface files. Placing the contents of the developer interface
  66. # folders provided with the 4.0.3 SDK into your 'MPW:Interfaces:' folders will eliminate
  67. # the need for any of the 'Installer_IncDir' variables within the example makefiles.
  68. # Be careful not to replace the entire folders within your 'MPW:Interfaces:' folder
  69. # with the installer interface folders. You should ADD the contents of the installer
  70. # Developer Interface folders to your 'MPW:Interface:' folders, by opening the Installer
  71. # interface folders one at a time, and adding the contents of each folder to the 
  72. # appropriate 'MPW:Interfaces:' folder. Example: open the installer
  73. # 'Developer Interfaces:RIncludes:' folder, then drag it's contents into your
  74. # 'MPW:Interfaces:RIncludes:' folder. Repeat this process for each of the installer
  75. # interfaces folders.
  76. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  77.  
  78. # You may place "Installer Debugger.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  79. # Doing this removes the need for the {InstallerDebuggerDir} variable within the makefile.
  80. InstallerDebuggerDir    = :::Installer Debugger 4.0:
  81.  
  82.  
  83. # source file to be compressed
  84. SimpleSourceFileName    = TeachText
  85. # archive file to be compressed into
  86. SimpleArchiveName        = :Disk 1:Tome
  87.  
  88. # make the debug version of finished installer script
  89. "{debugScriptName}" ƒ "{scriptName}"
  90.     # make a copy of the finished installer script and rename the copy
  91.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  92.     # add the installer debugger resources to the copied installer script
  93.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  94.  
  95. # make the standard version of finished installer script
  96. "{scriptName}" ƒ makefile "{scriptName}.r" "{SimpleArchiveName}" 
  97.     # establish current date with time of NOON
  98.     set theTime    "'`date -d -s` 12:00:00 PM'"
  99.     # rez the installer source into the form that the installer can read
  100.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}" 
  101.     # establish filename for finished installer script, set creation date and time, set attributes
  102.     SetFile -a b -d {theTime} "{scriptName}"
  103.     # run scriptcheck utility on the rezzed installer script
  104.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  105.     # set modification date and time for finished installer script
  106.     SetFile -m {theTime} "{scriptName}"
  107.  
  108. # do the simple compression
  109. "{SimpleArchiveName}" ƒ makefile "{SimpleSourceFileName}"
  110.     # compress entire source file into one archive
  111.     "{compressTool}" "{SimpleSourceFileName}" -o "{SimpleArchiveName}"
  112.  
  113.